/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import database.DokumentTabel;
import java.awt.BorderLayout;
import java.util.ArrayList;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;
import model.Dokument;

/**
 *
 * @author Adell
 */
public class PanelCekDokumen extends JPanel {

    private JTable tabelDokument;
    private JLabel labelDokument;
    private ArrayList<Dokument> data;

    public PanelCekDokumen(ArrayList<Dokument> data) {
        this.data = data;

        setLayout(new BorderLayout());
        labelDokument = new JLabel("Label Dokumen");
        labelDokument.setHorizontalAlignment(JLabel.CENTER);
        add(labelDokument, BorderLayout.NORTH);

        tabelDokument = new JTable();
        tabelDokument.setModel(new DokumentTabel(data));
        add(tabelDokument, BorderLayout.CENTER);
        setVisible(true);
    }
}
